/* generated using openapi-typescript-codegen -- do no edit */
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
import type { AnswerSaveRequest } from '../models/AnswerSaveRequest';
import type { BaseResponse_int_ } from '../models/BaseResponse_int_';
import type { BaseResponse_QuestionAnswerVO_ } from '../models/BaseResponse_QuestionAnswerVO_';
import type { CancelablePromise } from '../core/CancelablePromise';
import { OpenAPI } from '../core/OpenAPI';
import { request as __request } from '../core/request';
export class QuestionAnswerControllerService {
    /**
     * addAnswer
     * @param saveRequest saveRequest
     * @returns BaseResponse_int_ OK
     * @returns any Created
     * @throws ApiError
     */
    public static addAnswerUsingPost(
        saveRequest: AnswerSaveRequest,
    ): CancelablePromise<BaseResponse_int_ | any> {
        return __request(OpenAPI, {
            method: 'POST',
            url: '/api/answer/add',
            body: saveRequest,
            errors: {
                401: `Unauthorized`,
                403: `Forbidden`,
                404: `Not Found`,
            },
        });
    }
    /**
     * getAnswerVOById
     * @param questionId questionId
     * @returns BaseResponse_QuestionAnswerVO_ OK
     * @throws ApiError
     */
    public static getAnswerVoByIdUsingGet(
        questionId?: number,
    ): CancelablePromise<BaseResponse_QuestionAnswerVO_> {
        return __request(OpenAPI, {
            method: 'GET',
            url: '/api/answer/getById',
            query: {
                'questionId': questionId,
            },
            errors: {
                401: `Unauthorized`,
                403: `Forbidden`,
                404: `Not Found`,
            },
        });
    }
}
